package com.sure.supermarketserver.security.user.impl;


import com.sure.supermarketserver.security.user.User;
import com.sure.supermarketserver.security.user.UserDto;
import com.sure.supermarketserver.security.user.UserService;
import com.sure.supermarketserver.security.user.dao.UserDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {

    @Resource
    private UserDao userDao;

    @Override
    public List<User> getUserList() {
        return userDao.findUserList();
    }

    @Override
    public List<User> getUserList(UserDto dto) {
        return userDao.findUserListBydto(dto);
    }
}
